﻿Imports System.Windows.Forms

Namespace QuickEdit

    Public Class FormatForm

        Private _textBox As TextBox

        Public Shadows Sub Show(ByRef tb As TextBox)
            _textBox = tb
            Me.TopMost = True
            Me.StartPosition = FormStartPosition.Manual
            MyBase.Show(tb)
            Me.Location = tb.PointToClient(tb.Parent.PointToScreen(tb.Location))
        End Sub

        Private Sub FormatForm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
            e.Graphics.DrawRectangle(Drawing.Pens.Black, New System.Drawing.Rectangle(0, 0, Me.Width - 1, Me.Height - 1))
        End Sub

        Private Sub BTnToLower_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToLower.Click
            _textBox.Text = _textBox.Text.ToLower()
        End Sub

        Private Sub BtonToUpper_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToUpper.Click
            _textBox.Text = _textBox.Text.ToUpper()
        End Sub

    End Class

End Namespace